package com.course.server.exception;

import com.course.server.enums.BusinessExceptionEnum;
import lombok.Getter;
import lombok.Setter;

/**
 * @author: Durian
 * @date: 2021/5/30 13:38
 */
@Getter
@Setter
public class UserException extends RuntimeException {

    private BusinessExceptionEnum businessException;

    public UserException(BusinessExceptionEnum businessException) {
        super(businessException.getDesc());
        this.businessException = businessException;
    }

    /**
     * 不写入堆栈信息
     * @return Throwable
     */
    @Override
    public synchronized Throwable fillInStackTrace() {
        return super.fillInStackTrace();
    }
}
